//===================================
//File: Trapeze.cpp
//Trapeze function
//Name: Smirnova O.P.
//Date: 09.04.12, v.1.0
//===================================




#include "Trapeze.h"
#include <iostream>

using namespace std;

//---------------------------------------------------------------------------


Trapeze::Trapeze()
{
	this->A = Point();
	this->B = Point();
	this->C = Point();
	this->D = Point();
	this->h = 0;
	this->b = 0;
	this->c = 0;

}
Trapeze::Trapeze( Point C,  double h, double b,double c )
{

	this->C = C;
	this->B = Point((C.getX()+b/2),(C.getY()+h),0);
	this->D = Point((C.getX()-b),(C.getY()),0);
	this->A = Point((D.getX()-b/2),(C.getY()+h),0);
	
	this->h = h;
	this->b = b;
	this->c = c;
	
}
//---------------------------------------------------------------------------
Trapeze::~Trapeze()
{
///	cout << "\n~Trapeze:\n";
	
//	cout << "~Trapeze\n";
	
}

//---------------------------------------------------------------------------
Point Trapeze::getPointA () 
{
	return A;
};
//---------------------------------------------------------------------------
Point Trapeze::getPointB () 
{
	return B;
};
//---------------------------------------------------------------------------
Point Trapeze::getPointC () 
{
	return C;
};
//---------------------------------------------------------------------------
Point Trapeze::getPointD () 
{
	return D;
};
//---------------------------------------------------------------------------
double Trapeze::getH () 
{
	return h;
};
//---------------------------------------------------------------------------
double Trapeze::getB () 
{
	return b;
};
//---------------------------------------------------------------------------
double Trapeze::getC () 
{
	return c;
};
